﻿using System;
using System.Linq;

class Program
{
    static void Main()
    {
        Random random = new Random();
        var numbers = Enumerable.Range(0, 100).Select(_ => random.Next(0, 1001)).ToList();
        var sortedNumbers = numbers.OrderByDescending(n => n).ToList();
        int sum = sortedNumbers.Sum();
        double average = sortedNumbers.Average();
        Console.WriteLine("原始随机数列：");
        Console.WriteLine(string.Join(", ", numbers));
        Console.WriteLine("\n排序后的随机数列：");
        Console.WriteLine(string.Join(", ", sortedNumbers));
        Console.WriteLine($"\n总和：{sum}");
        Console.WriteLine($"平均数：{average}");
        Console.Read();
    }
}

